import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/components/Home'
import Market from '@/components/Market'
import Cart from '@/components/Cart'
import shouye from '@/components/shouye'
import Drink from '@/components/Drink'
import leftFruit from '@/components/LeftFurit'
import leftQingshi from '@/components/qingshi'
import Search from '@/components/Search'
import Goods from '@/components/Goods'
import Show from '@/components/Show'
import Mine from '@/components/Mine'
import Market2 from '@/components/Market2'
import Orders from '@/components/Orders'
import Orders2 from '@/components/Orders2'
import Login from '@/components/login'
import Register from '@/components/Register'
import Address from '@/components/Address'

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: '/',
      component:Address
    },
    {
      path: '/home',
      component: Home,
      children:[
          {
            path: '/home/',
            components: {
                s:shouye,
                left:leftFruit
            }
          },
          {
            path: '/home/drink',
            components: {
                s:Drink
            }
          },
          {
            path: '/home/leftfruit',
            components:{
                left:leftFruit,
                s:shouye
            }
          },
          {
            path: '/home/leftqingshi',
            components: {
                left:leftQingshi,
                s:shouye
            }
          }
      ]
    },
     {
       path: '/address',
       component: Address
     },
    {
      path: '/mine',
      component: Mine
    },
    {
      path: '/register',
      component: Register
    },
    {
      path: '/login',
      component: Login
    },
    {
      path: '/market',
      component: Market
    },
    {
      path: '/market2',
      component: Market2
    },
    {
      path: '/orders',
      component: Orders
    },
    {
      path: '/order2',
      component: Orders2
    },
    {
      path: '/cart',
      component: Cart
    },
    {
      path: '/search',
      component: Search
    },
    {
      path: '/goods',
      component: Goods
    },
    {
      path: '/show',
      component: Show
    }
  ]
})
